-- GENERATED SPELL FOR [Blood Elf Bandit] --


function spell0_17591(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(7159,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17591', 580, 1)
end

function spell1_17591(pUnit, Event) --@Eviscerate,n/a--
pUnit:FullCastSpellOnTarget(15691,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17591', 657, 1)
end

function spell2_17591(pUnit, Event) --@Shadowstalker Stealth,Self--
pUnit:FullCastSpellOnTarget(5916,pUnit)
pUnit:RegisterEvent('Sorts_17591', 570, 1)
end

function spell3_17591(pUnit, Event) --@Sinister Strike,n/a--
pUnit:FullCastSpellOnTarget(14873,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17591', 657, 1)
end

function Sorts_17591(pUnit, Event)
local choix_sorts_17591 = math.random(0, 3)
if choix_sorts_17591 == 0 then
pUnit:RegisterEvent('spell0_17591', 1, 1)
end
if choix_sorts_17591 == 1 then
pUnit:RegisterEvent('spell1_17591', 1, 1)
end
if choix_sorts_17591 == 2 then
pUnit:RegisterEvent('spell2_17591', 1, 1)
end
if choix_sorts_17591 == 3 then
pUnit:RegisterEvent('spell3_17591', 1, 1)
end
end

function mob17591_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17591', math.random(1500, 3000), 1)
end

function mob17591_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17591_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17591_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17591, 1, 'mob17591_Action')
RegisterUnitEvent(17591, 2, 'mob17591_Leave')
RegisterUnitEvent(17591, 3, 'mob17591_Kill')
RegisterUnitEvent(17591, 4, 'mob17591_Die')
